Import Packages

In [1]:
#importing some useful packages
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import glob
%matplotlib inline

Compute the camera calibration matrix and distortion coefficients given a set of chessboard images.

In [2]:
objp = np.zeros((6*9,3), np.float32)
objp[:,:2] = np.mgrid[0:9,0:6].T.reshape(-1,2)
objpoints = []
imgpoints = []
images = glob.glob('./camera_cal/calibration*.jpg')

for fname in images:
    img = cv2.imread(fname)
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    ret, corners = cv2.findChessboardCorners(gray, (9,6), None)
    if ret == True:
        objpoints.append(objp)
        imgpoints.append(corners)
        cal_img = cv2.drawChessboardCorners(img, (9,6), corners, ret)
        plt.imshow(cal_img)
        plt.show()  

ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, gray.shape[::-1], None, None)

Ideas for Lane Detection Pipeline

Below are some helper functions.

In [3]:
import math

def undistort(img,mtx, dist, channel= 'BGR', show=False):
    '''The input img is BGR image. The output dst is RGB image.'''
    if channel == 'RGB':
        img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
    h, w = img.shape[:2]
    dst = cv2.undistort(img, mtx, dist, None, mtx)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
    dst = cv2.cvtColor(dst, cv2.COLOR_BGR2RGB)
    if show:
        plt.figure(figsize=(20,30))
        plt.subplot(121) 
        plt.imshow(img)
        plt.title('before')
        plt.subplot(122) 
        plt.imshow(dst)
        plt.title('after')
        plt.show()  
    return dst

def abs_sobel_thresh(img, thresh_min=0, thresh_max=255, s_thresh_min=0, s_thresh_max=255, show=False):
    '''the input img is RGB img'''
    hls = cv2.cvtColor(img, cv2.COLOR_RGB2HLS)
    s_channel = hls[:,:,2]
    gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
    # Sobel x
    sobelx = cv2.Sobel(gray, cv2.CV_64F, 1, 0) # Take the derivative in x
    abs_sobelx = np.absolute(sobelx) # Absolute x derivative to accentuate lines away from horizontal
    scaled_sobel = np.uint8(255*abs_sobelx/np.max(abs_sobelx))
    sxbinary = np.zeros_like(scaled_sobel)
    sxbinary[(scaled_sobel >= thresh_min) & (scaled_sobel <= thresh_max)] = 1
    s_binary = np.zeros_like(s_channel)
    s_binary[(s_channel >= s_thresh_min) & (s_channel <= s_thresh_max)] = 1
    combined_binary = np.zeros_like(sxbinary)
    combined_binary[(s_binary == 1) | (sxbinary == 1)] = 1
    if show:
        plt.figure(figsize=(20,30))
        plt.subplot(121) 
        plt.imshow(img)
        plt.title('before')
        plt.subplot(122) 
        plt.imshow(combined_binary,cmap='gray')
        plt.title('after')
        plt.show()  
    return combined_binary

def corners_unwarp(img, src, dst, offset=100, color=[255, 0, 0], thickness=2, show=False):
    raw_img = np.copy(img)
    img_size = (img.shape[1], img.shape[0])
    M = cv2.getPerspectiveTransform(src, dst)
    Minv = cv2.getPerspectiveTransform(dst, src)
    warped = cv2.warpPerspective(raw_img, M, img_size, flags=cv2.INTER_LINEAR)
    if show:
        cv2.line(img, tuple(src[0]), tuple(src[1]), color, thickness)
        cv2.line(img, tuple(src[1]), tuple(src[2]), color, thickness)
        cv2.line(img, tuple(src[2]), tuple(src[3]), color, thickness)
        cv2.line(img, tuple(src[3]), tuple(src[0]), color, thickness)        
        cv2.line(warped, tuple(dst[0]), tuple(dst[1]), color, thickness)
        cv2.line(warped, tuple(dst[1]), tuple(dst[2]), color, thickness)
        cv2.line(warped, tuple(dst[2]), tuple(dst[3]), color, thickness)
        cv2.line(warped, tuple(dst[3]), tuple(dst[0]), color, thickness)
        plt.figure(figsize=(20,30))
        plt.subplot(121) 
        plt.imshow(img)
        plt.subplot(122) 
        plt.imshow(warped)
        plt.show()  
    return warped, M, Minv

def wrap(img, M, dst, color=[255, 0, 0], thickness=2, show=False):
    warped = cv2.warpPerspective(img, M, (img.shape[1], img.shape[0]))
    warped_copy = np.copy(warped)
    if show:
        cv2.line(warped_copy, tuple(dst[0]), tuple(dst[1]), color, thickness)
        cv2.line(warped_copy, tuple(dst[1]), tuple(dst[2]), color, thickness)
        cv2.line(warped_copy, tuple(dst[2]), tuple(dst[3]), color, thickness)
        cv2.line(warped_copy, tuple(dst[3]), tuple(dst[0]), color, thickness)
        plt.figure(figsize=(20,30))
        plt.subplot(121) 
        plt.imshow(img,cmap='gray')
        plt.title('before')
        plt.subplot(122) 
        plt.imshow(warped_copy,cmap='gray')
        plt.title('after')
        plt.show() 
    return warped


def search_lines1(binary_warped, show=False):
    # Assuming you have created a warped binary image called "binary_warped"
    # Take a histogram of the bottom half of the image
    histogram = np.sum(binary_warped[binary_warped.shape[0]//2:,:], axis=0)
    # Create an output image to draw on and  visualize the result
    out_img = np.dstack((binary_warped, binary_warped, binary_warped))*255
    # Find the peak of the left and right halves of the histogram
    # These will be the starting point for the left and right lines
    midpoint = np.int(histogram.shape[0]//2)
    leftx_base = np.argmax(histogram[:midpoint])
    rightx_base = np.argmax(histogram[midpoint:]) + midpoint

    # Choose the number of sliding windows
    nwindows = 9
    # Set height of windows
    window_height = np.int(binary_warped.shape[0]//nwindows)
    # Identify the x and y positions of all nonzero pixels in the image
    nonzero = binary_warped.nonzero()
    nonzeroy = np.array(nonzero[0])
    nonzerox = np.array(nonzero[1])
    # Current positions to be updated for each window
    leftx_current = leftx_base
    rightx_current = rightx_base
    # Set the width of the windows +/- margin
    margin = 100
    # Set minimum number of pixels found to recenter window
    minpix = 50
    # Create empty lists to receive left and right lane pixel indices
    left_lane_inds = []
    right_lane_inds = []

    # Step through the windows one by one
    for window in range(nwindows):
        # Identify window boundaries in x and y (and right and left)
        win_y_low = binary_warped.shape[0] - (window+1)*window_height
        win_y_high = binary_warped.shape[0] - window*window_height
        win_xleft_low = leftx_current - margin
        win_xleft_high = leftx_current + margin
        win_xright_low = rightx_current - margin
        win_xright_high = rightx_current + margin
        # Draw the windows on the visualization image
        cv2.rectangle(out_img,(win_xleft_low,win_y_low),(win_xleft_high,win_y_high),
        (0,255,0), 2) 
        cv2.rectangle(out_img,(win_xright_low,win_y_low),(win_xright_high,win_y_high),
        (0,255,0), 2) 
        # Identify the nonzero pixels in x and y within the window
        good_left_inds = ((nonzeroy >= win_y_low) & (nonzeroy < win_y_high) & 
        (nonzerox >= win_xleft_low) &  (nonzerox < win_xleft_high)).nonzero()[0]
        good_right_inds = ((nonzeroy >= win_y_low) & (nonzeroy < win_y_high) & 
        (nonzerox >= win_xright_low) &  (nonzerox < win_xright_high)).nonzero()[0]
        # Append these indices to the lists
        left_lane_inds.append(good_left_inds)
        right_lane_inds.append(good_right_inds)
        # If you found > minpix pixels, recenter next window on their mean position
        if len(good_left_inds) > minpix:
            leftx_current = np.int(np.mean(nonzerox[good_left_inds]))
        if len(good_right_inds) > minpix:        
            rightx_current = np.int(np.mean(nonzerox[good_right_inds]))

    # Concatenate the arrays of indices
    left_lane_inds = np.concatenate(left_lane_inds)
    right_lane_inds = np.concatenate(right_lane_inds)

    # Extract left and right line pixel positions
    leftx = nonzerox[left_lane_inds]
    lefty = nonzeroy[left_lane_inds] 
    rightx = nonzerox[right_lane_inds]
    righty = nonzeroy[right_lane_inds] 

    # Fit a second order polynomial to each
    left_fit = np.polyfit(lefty, leftx, 2)
    right_fit = np.polyfit(righty, rightx, 2)
    
    ploty = np.linspace(0, binary_warped.shape[0]-1, binary_warped.shape[0] )
    left_fitx = left_fit[0]*ploty**2 + left_fit[1]*ploty + left_fit[2]
    right_fitx = right_fit[0]*ploty**2 + right_fit[1]*ploty + right_fit[2]

    out_img[nonzeroy[left_lane_inds], nonzerox[left_lane_inds]] = [255, 0, 0]
    out_img[nonzeroy[right_lane_inds], nonzerox[right_lane_inds]] = [0, 0, 255]
    if show:
        plt.imshow(out_img)
        plt.plot(left_fitx, ploty, color='yellow')
        plt.plot(right_fitx, ploty, color='yellow')
        plt.xlim(0, 1280)
        plt.ylim(720, 0)
        plt.show()
    return left_fitx,right_fitx, ploty

def calculate_curv_and_pos(binary_warped,leftx, rightx):
    ploty = np.linspace(0, binary_warped.shape[0]-1, binary_warped.shape[0] )
    # Define conversions in x and y from pixels space to meters
    ym_per_pix = 30/720 # meters per pixel in y dimension
    xm_per_pix = 3.7/700 # meters per pixel in x dimension
    y_eval = np.max(ploty)
    # Fit new polynomials to x,y in world space
    left_fit_cr = np.polyfit(ploty*ym_per_pix, leftx*xm_per_pix, 2)
    right_fit_cr = np.polyfit(ploty*ym_per_pix, rightx*xm_per_pix, 2)
    # Calculate the new radii of curvature
    left_curverad = ((1 + (2*left_fit_cr[0]*y_eval*ym_per_pix + left_fit_cr[1])**2)**1.5) / np.absolute(2*left_fit_cr[0])
    right_curverad = ((1 + (2*right_fit_cr[0]*y_eval*ym_per_pix + right_fit_cr[1])**2)**1.5) / np.absolute(2*right_fit_cr[0])
    
    curvature = ((left_curverad + right_curverad) / 2)
    lane_width = np.absolute(leftx[450] - rightx[450])
    diff_lane_width = np.absolute(np.absolute(leftx[250] - rightx[250])-700)
    print(diff_lane_width)
    lane_xm_per_pix = 3.7 / lane_width
    veh_pos = (((leftx[450] + rightx[450]) * lane_xm_per_pix) / 2.)
    cen_pos = ((binary_warped.shape[1] * lane_xm_per_pix) / 2.)
    distance_from_center = veh_pos - cen_pos
#     print(abs(left_curverad - right_curverad))
    return curvature,distance_from_center

    
def draw_lines(warped,left_fitx,right_fitx, ploty, Minv,undist, show=False):
    # Create an image to draw the lines on
    warp_zero = np.zeros_like(warped).astype(np.uint8)
    color_warp = np.dstack((warp_zero, warp_zero, warp_zero))

    # Recast the x and y points into usable format for cv2.fillPoly()
    pts_left = np.array([np.transpose(np.vstack([left_fitx, ploty]))])
    pts_right = np.array([np.flipud(np.transpose(np.vstack([right_fitx, ploty])))])
    pts = np.hstack((pts_left, pts_right))
    # Draw the lane onto the warped blank image
    cv2.fillPoly(color_warp, np.int_([pts]), (0,255, 0))

    # Warp the blank back to original image space using inverse perspective matrix (Minv)
    newwarp = cv2.warpPerspective(color_warp, Minv, (warped.shape[1], warped.shape[0])) 
    # Combine the result with the original image
    result = cv2.addWeighted(undist, 1, newwarp, 0.3, 0)
    curvature,distance_from_center = calculate_curv_and_pos(warped,left_fitx, right_fitx)
    if distance_from_center < 0:
        text = 'left'
    else:
        text = 'right'
    font = cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(result, "Radius of Curvature = %s(m)"%(round(curvature)), (50, 100), font, 1, (255, 255, 255), 2)
    cv2.putText(result, "Vehicle is %.2fm %s of center"%(abs(distance_from_center),text), (50, 150), font, 1, (255, 255, 255), 2)
    if show:
        plt.figure(figsize=(20,30))
        plt.imshow(result)
        plt.show()
    return result    


def calculate_curv_and_pos_video(binary_warped,leftx, rightx):
    ploty = np.linspace(0, binary_warped.shape[0]-1, binary_warped.shape[0] )
    # Define conversions in x and y from pixels space to meters
    ym_per_pix = 30/720 # meters per pixel in y dimension
    xm_per_pix = 3.7/700 # meters per pixel in x dimension
    y_eval = np.max(ploty)
    # Fit new polynomials to x,y in world space
    left_fit_cr = np.polyfit(ploty*ym_per_pix, leftx*xm_per_pix, 2)
    right_fit_cr = np.polyfit(ploty*ym_per_pix, rightx*xm_per_pix, 2)
    # Calculate the new radii of curvature
    left_curverad = ((1 + (2*left_fit_cr[0]*y_eval*ym_per_pix + left_fit_cr[1])**2)**1.5) / np.absolute(2*left_fit_cr[0])
    right_curverad = ((1 + (2*right_fit_cr[0]*y_eval*ym_per_pix + right_fit_cr[1])**2)**1.5) / np.absolute(2*right_fit_cr[0])
    
    curvature = ((left_curverad + right_curverad) / 2)
    lane_width = np.absolute(leftx[450] - rightx[450])
    diff_lane_width = np.absolute(np.absolute(leftx[250] - rightx[250])-700)
#     print(diff_lane_width)
    lane_xm_per_pix = 3.7 / lane_width
    veh_pos = (((leftx[450] + rightx[450]) * lane_xm_per_pix) / 2.)
    cen_pos = ((binary_warped.shape[1] * lane_xm_per_pix) / 2.)
    distance_from_center = veh_pos - cen_pos
    diff_curver = abs(left_curverad - right_curverad)
    return curvature,distance_from_center,diff_curver,diff_lane_width

last_lines = []    
def draw_lines_video(warped,left_fitx,right_fitx, ploty, Minv,undist, show=False):
    global last_lines
    curvature,distance_from_center,diff_curver,diff_lane_width = calculate_curv_and_pos_video(warped,left_fitx, right_fitx)
    if (diff_curver > 500 or diff_lane_width>50)and len(last_lines)>0:
        print(diff_curver,"  ",diff_lane_width)
        left_fitx = last_lines[0]
        right_fitx = last_lines[1]
    last_lines = [left_fitx,right_fitx]    
    # Create an image to draw the lines on
    warp_zero = np.zeros_like(warped).astype(np.uint8)
    color_warp = np.dstack((warp_zero, warp_zero, warp_zero))

    # Recast the x and y points into usable format for cv2.fillPoly()
    pts_left = np.array([np.transpose(np.vstack([left_fitx, ploty]))])
    pts_right = np.array([np.flipud(np.transpose(np.vstack([right_fitx, ploty])))])
    pts = np.hstack((pts_left, pts_right))
    # Draw the lane onto the warped blank image
    cv2.fillPoly(color_warp, np.int_([pts]), (0,255, 0))

    # Warp the blank back to original image space using inverse perspective matrix (Minv)
    newwarp = cv2.warpPerspective(color_warp, Minv, (warped.shape[1], warped.shape[0])) 
    # Combine the result with the original image
    result = cv2.addWeighted(undist, 1, newwarp, 0.3, 0)
    
    if distance_from_center < 0:
        text = 'left'
    else:
        text = 'right'
    font = cv2.FONT_HERSHEY_SIMPLEX
    cv2.putText(result, "Radius of Curvature = %s(m)"%(round(curvature)), (50, 100), font, 1, (255, 255, 255), 2)
    cv2.putText(result, "Vehicle is %.2fm %s of center"%(abs(distance_from_center),text), (50, 150), font, 1, (255, 255, 255), 2)
    if show:
        plt.figure(figsize=(20,30))
        plt.imshow(result)
        plt.show()
    return result 

Build a Lane Finding Pipeline

In [4]:
def draw_lane_lines(img,M,dst,Minv, channel= 'BGR', show=False):
    undistorted_img = undistort(img,mtx, dist,channel,show)
    thresh_min=20
    thresh_max=100
    s_thresh_min=170
    s_thresh_max=255
    warped = wrap(undistorted_img, M, dst, [255, 0, 0], 3,show)
    thresh_img = abs_sobel_thresh(warped, thresh_min, thresh_max, s_thresh_min, s_thresh_max,show)
    left_fitx,right_fitx, ploty = search_lines1(thresh_img,show)
    result = draw_lines(thresh_img,left_fitx,right_fitx, ploty, Minv,undistorted_img,show)
    return result

def draw_lane_lines_video(img,M,dst,Minv, channel= 'BGR', show=False):
    undistorted_img = undistort(img,mtx, dist,channel,show)
    thresh_min=20
    thresh_max=100
    s_thresh_min=170
    s_thresh_max=255
    warped = wrap(undistorted_img, M, dst, [255, 0, 0], 3,show)
    thresh_img = abs_sobel_thresh(warped, thresh_min, thresh_max, s_thresh_min, s_thresh_max,show)
    left_fitx,right_fitx, ploty = search_lines1(thresh_img,show)
    result = draw_lines_video(thresh_img,left_fitx,right_fitx, ploty, Minv,undistorted_img,show)
    return result

Pick four points in a trapezoidal shape (similar to region masking) that would represent a rectangle when looking down on the road from above.

In [5]:
offset=280
test_images = glob.glob('./test_images/straight_lines*.jpg')
img = cv2.imread(test_images[1])
img = undistort(img,mtx, dist)
img_size = (img.shape[1], img.shape[0])
src = np.float32([[193,img_size[1]],[591,450],[688,450],[1108,img_size[1]]])
dst = np.float32([[offset, img_size[1]], [offset, 0], 
                         [img_size[0]-offset, 0], 
                         [img_size[0]-offset, img_size[1]]])
print(src)
print(dst)
warped, M, Minv = corners_unwarp(img, src,dst, offset=100, color=[255, 0, 0], thickness=2,show=True)
[[  193.   720.]
 [  591.   450.]
 [  688.   450.]
 [ 1108.   720.]]
[[  280.   720.]
 [  280.     0.]
 [ 1000.     0.]
 [ 1000.   720.]]

Test Images

In [6]:
test_images = glob.glob('./test_images/*.jpg')
for fname in test_images:
    print(fname)
    img = cv2.imread(fname)
    result_image = draw_lane_lines(img,M,dst,Minv, channel= 'BGR', show=True)
#     plt.imshow(result_image,cmap='gray')
#     plt.show()
./test_images/test3.jpg
22.9242372191
./test_images/straight_lines1.jpg
18.8680035322
./test_images/test1.jpg
22.6961286605
./test_images/test2.jpg
14.5982409181
./test_images/test5.jpg
59.0530373556
./test_images/test6.jpg
21.7993650357
./test_images/test4.jpg
34.1328509356
./test_images/straight_lines2.jpg
3.06451847361

Test on Videos

In [7]:
# Import everything needed to edit/save/watch video clips
from moviepy.editor import VideoFileClip
from IPython.display import HTML
In [8]:
def process_image(image):
    result = draw_lane_lines_video(image,M,dst,Minv,'RGB')
    return result
In [9]:
white_output = 'test_videos_output/project_video_output.mp4'
## To speed up the testing process you may want to try your pipeline on a shorter subclip of the video
## To do so add .subclip(start_second,end_second) to the end of the line below
## Where start_second and end_second are integer values representing the start and end of the subclip
## You may also uncomment the following line for a subclip of the first 5 seconds
##clip1 = VideoFileClip("test_videos/solidWhiteRight.mp4").subclip(0,5)
clip1 = VideoFileClip("project_video.mp4")
white_clip = clip1.fl_image(process_image) #NOTE: this function expects color images!!
%time white_clip.write_videofile(white_output, audio=False)
[MoviePy] >>>> Building video test_videos_output/project_video_output.mp4
[MoviePy] Writing video test_videos_output/project_video_output.mp4
  1%|▏         | 18/1261 [00:01<01:32, 13.42it/s]
63.0853104552    50.5425440874
2.52808344189    55.9198643066
  3%|▎         | 40/1261 [00:02<01:27, 14.01it/s]
37.7599116795    50.5032247104
33.0165037836    60.5133118518
52.2100502631    54.6814590367
  3%|▎         | 42/1261 [00:03<01:27, 13.98it/s]
46.9886809588    55.0010601112
57.5172403855    50.9113249449
  5%|▍         | 62/1261 [00:04<01:36, 12.37it/s]
4.08371980989    63.5236338774
49.9464201055    67.8070128678
1.71532487917    78.0845969761
  5%|▌         | 64/1261 [00:04<01:36, 12.38it/s]
1.2404132321    70.2289378078
1.19488067657    76.6828425264
8.61297157401    67.005062683
  5%|▌         | 68/1261 [00:05<01:37, 12.21it/s]
45.546206079    72.6063273132
44.3861029305    69.8367853671
12.9571075417    62.7615390858
  6%|▌         | 70/1261 [00:05<01:36, 12.30it/s]
90.2534984798    74.3103564843
124.855165628    60.080505057
198.925120269    61.7390738915
  6%|▌         | 74/1261 [00:05<01:35, 12.44it/s]
239.582963779    55.2931552936
222.334710481    52.1370793816
205.228921342    53.1160948347
  7%|▋         | 90/1261 [00:07<01:36, 12.13it/s]
55.6076368053    56.3474338677
52.0943472475    75.1237149577
50.236976006    64.7531002218
  7%|▋         | 94/1261 [00:07<01:36, 12.09it/s]
49.0601244606    61.2081514113
0.198442585014    69.619008694
12.5232105662    71.6907715276
  8%|▊         | 96/1261 [00:07<01:36, 12.04it/s]
5.72006289451    62.1722732286
72.7450706194    58.0284584247
51.477305913    59.0600870345
  8%|▊         | 100/1261 [00:07<01:35, 12.11it/s]
41.4715864246    55.4142856818
0.335594801409    51.3502675687
  8%|▊         | 104/1261 [00:08<01:36, 11.99it/s]
2.30960736247    57.0495007481
12.9956341066    53.5560989666
7.65766497281    53.6544940726
 10%|▉         | 122/1261 [00:09<01:33, 12.20it/s]
35.4723238802    61.4185429839
37.2317787809    53.3175903896
43.0426804014    58.0579654942
 10%|▉         | 124/1261 [00:09<01:33, 12.16it/s]
27.3126642354    67.895809656
38.7389675848    69.9922824458
25.0394475587    72.2717324575
 10%|█         | 128/1261 [00:10<01:33, 12.12it/s]
33.8063258621    56.0150722522
13.8408235368    62.4577214941
10.2860360281    54.9347666304
 10%|█         | 130/1261 [00:10<01:34, 11.93it/s]
19.9962119183    71.71496152
16.6844585379    66.5354636901
38.9972155778    69.6801584226
 11%|█         | 134/1261 [00:10<01:35, 11.75it/s]
52.7906900635    74.7946109677
49.8917461187    68.8306041559
64.6109263453    71.8171214305
 11%|█         | 136/1261 [00:10<01:35, 11.84it/s]
73.1892301357    66.0600105873
68.2260551377    59.7257404501
68.8140409866    50.5981522982
 12%|█▏        | 150/1261 [00:12<01:34, 11.79it/s]
87.7770676484    69.1717455489
54.7424012087    69.3105061618
50.5912052085    58.0625533426
 12%|█▏        | 152/1261 [00:12<01:35, 11.67it/s]
62.9843241268    52.2991304763
10.2239908954    56.6734057414
 13%|█▎        | 160/1261 [00:12<01:33, 11.73it/s]
40.5339988428    50.8263682775
65.5486221016    50.1053630289
 13%|█▎        | 166/1261 [00:13<01:30, 12.11it/s]
27.1435043452    50.5983832873
57.5897595648    56.6548048914
 14%|█▍        | 176/1261 [00:14<01:30, 11.97it/s]
113.365448717    54.6466340376
105.632533394    60.6274915477
 15%|█▍        | 186/1261 [00:15<01:32, 11.57it/s]
37.8476299496    61.2492452183
26.2594370462    71.3790670297
0.316774981769    97.931310084
 15%|█▍        | 188/1261 [00:15<01:32, 11.63it/s]
13.6685996919    99.1839847927
11.0687794432    109.072242558
4.07833768268    106.591912257
 15%|█▌        | 192/1261 [00:15<01:29, 11.92it/s]
29.4191209736    105.412999266
41.2113895509    111.939811239
7.06117961701    106.047492395
 15%|█▌        | 194/1261 [00:15<01:28, 12.03it/s]
39.2124064481    109.751255002
38.8241274831    103.395572512
24.2188568775    100.480281062
 16%|█▌        | 198/1261 [00:16<01:28, 12.03it/s]
55.1941558677    64.339447749
 16%|█▋        | 208/1261 [00:16<01:29, 11.81it/s]
20.3734582552    58.3412459892
17.4153668402    68.091573037
14.1522111016    55.0884845425
 19%|█▉        | 240/1261 [00:19<01:24, 12.04it/s]
117.164027794    50.896190509
89.1481719928    57.4057640844
79.5019465059    54.7133645978
 19%|█▉        | 242/1261 [00:19<01:25, 11.92it/s]
68.007530987    53.4823818151
96.1752406742    56.3606652063
 20%|█▉        | 246/1261 [00:20<01:22, 12.31it/s]
134.082891654    62.4788687027
109.220541254    67.6847865559
96.5830643643    62.7830304057
 20%|█▉        | 250/1261 [00:20<01:24, 11.97it/s]
93.8651686781    77.3247591711
81.406010823    64.5877328779
76.090577852    68.107095484
 20%|█▉        | 252/1261 [00:20<01:25, 11.80it/s]
84.3347602689    59.8043850075
82.549442279    55.3796987483
102.516291257    57.453749816
 20%|██        | 256/1261 [00:21<01:29, 11.18it/s]
101.784571021    57.3053309129
120.820507354    53.4716234321
172.812496083    58.6086578989
 21%|██        | 260/1261 [00:21<01:26, 11.63it/s]
166.968066486    63.2100385475
150.882960202    57.1857986927
124.376018891    66.8269166919
 21%|██        | 264/1261 [00:21<01:26, 11.55it/s]
120.691069731    52.5202381919
92.0528459835    50.2916825907
 22%|██▏       | 274/1261 [00:22<01:23, 11.89it/s]
64.4438700169    54.0758494547
101.998359443    54.7023273072
65.2512489301    71.2865305601
 22%|██▏       | 276/1261 [00:22<01:22, 11.94it/s]
95.1901830371    62.4744505677
 23%|██▎       | 284/1261 [00:23<01:20, 12.20it/s]
255.556081221    56.0181626994
232.533147173    50.0290164235
 23%|██▎       | 294/1261 [00:24<01:20, 11.97it/s]
213.456886286    54.0661091305
353.044240603    50.6940499821
338.623787648    57.5049392595
 23%|██▎       | 296/1261 [00:24<01:19, 12.08it/s]
315.836331934    51.7698799784
275.499993157    59.1595280705
242.423663042    52.8022346104
 24%|██▍       | 308/1261 [00:25<01:19, 11.99it/s]
2720.78697443    42.1620387134
1197.04904892    25.7347717419
288.759450673    51.8180647385
 25%|██▍       | 312/1261 [00:25<01:19, 12.01it/s]
1245.15094498    52.9985665495
1300.87921832    65.854222352
551.876045345    64.4406605144
 25%|██▍       | 314/1261 [00:25<01:18, 12.13it/s]
1090.46265081    85.5356149243
1348.67356061    75.8596668764
2319.78303796    73.7252882218
 25%|██▌       | 318/1261 [00:26<01:17, 12.12it/s]
2436.02076819    63.0002971215
14611.1596933    54.309404159
120850.990484    74.3377548857
 25%|██▌       | 320/1261 [00:26<01:17, 12.15it/s]
53261.9842848    66.2144418842
13297.6392345    79.7017568647
6811.97755877    69.8419998145
 26%|██▌       | 324/1261 [00:26<01:17, 12.12it/s]
7151.243177    69.2542238385
6417.83742002    70.1322826711
4029.80538603    49.8119644912
 26%|██▌       | 326/1261 [00:26<01:19, 11.70it/s]
5196.70814891    56.8348408844
5163.88968715    56.3683660448
3952.7387653    46.2528612025
 26%|██▌       | 330/1261 [00:27<01:17, 11.98it/s]
2751.39555784    45.717741384
2282.27719777    25.0710409538
1549.3309782    39.9912590046
 26%|██▋       | 332/1261 [00:27<01:19, 11.74it/s]
5850.86077921    48.1746286353
12933.3471395    74.4602737596
14591.5674557    82.6232329534
 27%|██▋       | 336/1261 [00:27<01:18, 11.73it/s]
29754.5940379    77.8594444231
17064.8000991    77.5560522829
7813.21528379    47.179497622
 27%|██▋       | 338/1261 [00:27<01:17, 11.93it/s]
3612.9740269    45.1513988374
2210780.61911    41.8640194421
40301.0862818    43.7214341893
 27%|██▋       | 342/1261 [00:28<01:17, 11.90it/s]
4486.82664078    57.1596765187
3122.51514511    59.0432458667
3079.23834961    78.8446613083
 27%|██▋       | 344/1261 [00:28<01:16, 11.95it/s]
3471.32743692    67.544668071
4718.33901926    57.4798155575
1821.99910877    50.2223727044
 28%|██▊       | 348/1261 [00:28<01:16, 11.92it/s]
1639.50019534    38.2154789157
544.558718692    47.4776434976
656.941766983    32.986044846
 28%|██▊       | 358/1261 [00:29<01:13, 12.21it/s]
710.777275275    35.0638190635
5066.69504553    29.2708793695
44806.6780151    43.0058743204
 29%|██▊       | 362/1261 [00:29<01:14, 12.13it/s]
4163.22167136    35.9566978502
3269.63366335    34.1603160051
733.605881691    43.4135772061
 29%|██▉       | 364/1261 [00:29<01:13, 12.26it/s]
873.648809958    39.1516192999
1291.43940997    62.5541933239
4777.37087295    56.4093637735
 29%|██▉       | 368/1261 [00:30<01:13, 12.11it/s]
7739.64979344    58.0778225022
15511.3254655    53.2836801621
2267332.28741    45.4919238458
 29%|██▉       | 370/1261 [00:30<01:14, 12.02it/s]
474.410248482    58.5245815125
1211.21254194    49.8794513784
1016.18775076    53.2713664648
 30%|██▉       | 374/1261 [00:30<01:13, 12.12it/s]
669.90846449    41.8615482993
5327.58346174    45.8732993263
 30%|██▉       | 376/1261 [00:30<01:12, 12.27it/s]
21166.7353503    52.5611636169
9260.38705723    74.2463949562
33809.0197903    73.0160854134
 30%|███       | 380/1261 [00:31<01:14, 11.80it/s]
6407.32256322    77.064891211
2468.18022535    65.526648393
2001.57355889    56.8001084226
 30%|███       | 382/1261 [00:31<01:13, 11.93it/s]
18530.1082283    48.7891487079
8939.41562542    45.0606152182
18836.3365644    51.4927042737
 31%|███       | 386/1261 [00:31<01:12, 12.00it/s]
2117.43553742    51.864798129
2134.39312384    48.108243506
12921.0990654    39.9923173374
 31%|███       | 388/1261 [00:32<01:14, 11.72it/s]
125417.56491    24.9791640619
29881.3824378    32.460688267
15082.2628393    23.7626133563
 31%|███       | 392/1261 [00:32<01:15, 11.56it/s]
2916.38409527    15.9649753177
18722.3453289    15.4193248439
1455.14749088    9.90766848899
 32%|███▏      | 398/1261 [00:32<01:12, 11.84it/s]
511.621625435    16.3664031355
2090.9513853    6.4098142205
1205.70540538    4.97165840284
 32%|███▏      | 400/1261 [00:33<01:12, 11.93it/s]
833.300074299    1.78089466465
16615.2251064    2.75699672106
5910.67967112    3.32759501678
 32%|███▏      | 404/1261 [00:33<01:10, 12.09it/s]
717.038189256    3.22256795776
9605.41820177    5.23009396788
2992.91418216    4.35215521575
 32%|███▏      | 406/1261 [00:33<01:11, 12.00it/s]
3674.43238557    5.50268997366
4400.4447387    2.40750787518
1686.93824674    5.36728456907
 33%|███▎      | 410/1261 [00:33<01:10, 12.01it/s]
2936.72823674    4.50757697244
762.514329373    5.66492024258
2326.08771997    1.59694416872
 33%|███▎      | 412/1261 [00:34<01:09, 12.18it/s]
3359.14174542    2.36962152114
8341.0918964    0.223043122057
1439.65543163    3.09519796366
 33%|███▎      | 416/1261 [00:34<01:08, 12.35it/s]
1103.42282747    3.05835875986
12954.4801631    20.0729232847
25088.9974416    4.04966027133
 33%|███▎      | 418/1261 [00:34<01:07, 12.54it/s]
2648.42432233    14.1641506453
2281.22420313    8.37890341448
2330.33966708    3.83054889391
 33%|███▎      | 422/1261 [00:34<01:09, 12.09it/s]
4381.94790264    13.4095140649
4841.78515263    9.09577454322
18590.2968206    23.4988562232
 34%|███▎      | 424/1261 [00:35<01:11, 11.74it/s]
27155.5555394    12.2853927222
3509.05985571    9.63767751594
 34%|███▍      | 430/1261 [00:35<01:10, 11.79it/s]
862.506817678    1.13405158092
4215.80640355    5.61990805273
4565.0806637    6.19275388222
 34%|███▍      | 432/1261 [00:35<01:09, 11.88it/s]
8034.54539187    7.04187721055
3374.73345464    5.66044624546
8633.02506951    25.1323449521
 35%|███▍      | 436/1261 [00:36<01:11, 11.52it/s]
6757.41657076    16.0433556936
8910.81916842    17.7102561234
961.490486319    9.01898236984
 35%|███▍      | 438/1261 [00:36<01:11, 11.45it/s]
1344.54149609    14.5389780642
1831.9645464    2.36786055526
 35%|███▌      | 442/1261 [00:36<01:11, 11.50it/s]
2136.91268447    40.0134923358
2529.28047318    31.5020668915
5421.72343025    30.2780161195
 35%|███▌      | 444/1261 [00:36<01:09, 11.71it/s]
4826.6491477    1.36882338206
5194.10333334    3.93269246592
5316.65707951    4.64621829386
 36%|███▌      | 448/1261 [00:37<01:09, 11.68it/s]
4745.3639857    2.91077563755
4525.2618098    21.832196313
9215.14284959    17.3453371342
 36%|███▌      | 450/1261 [00:37<01:10, 11.50it/s]
3200.5593212    32.5272855414
39091.3573035    29.0610495223
13457.9751687    31.4266697522
 36%|███▌      | 454/1261 [00:37<01:08, 11.84it/s]
15790.001902    30.6142941431
966.839085714    22.2089579039
1308.21682945    39.7222745123
 36%|███▌      | 456/1261 [00:37<01:08, 11.68it/s]
506.830930033    39.5755632982
4180.53163532    38.2935581885
7019.30346357    37.3543636304
 36%|███▋      | 460/1261 [00:38<01:06, 12.03it/s]
113339.936729    33.0910882173
5979.22111192    49.4765177731
4280.49522486    40.9811228235
 37%|███▋      | 462/1261 [00:38<01:06, 12.03it/s]
969.781943422    42.3656979948
1067.12090939    30.2808998663
1213.19036529    16.3420015242
 37%|███▋      | 470/1261 [00:38<01:05, 12.01it/s]
1006.89378315    30.3436859028
3727.47732553    22.8779447852
 38%|███▊      | 474/1261 [00:39<01:05, 12.03it/s]
11896.1640022    15.0747594345
5888.99932756    14.7932539371
8490.42743295    21.3103812602
 38%|███▊      | 476/1261 [00:39<01:05, 12.05it/s]
265238.65807    0.460636166413
5126.74878995    4.63433282961
12255.0479057    9.60180757921
 38%|███▊      | 480/1261 [00:39<01:04, 12.05it/s]
20556.4029295    15.5467557652
90032.0988955    20.9458791953
34970.4294122    33.5674938862
 38%|███▊      | 482/1261 [00:39<01:04, 12.05it/s]
79254.6649003    24.2582777219
160230.174199    37.7271236937
3906.56800934    42.8860509716
 39%|███▊      | 486/1261 [00:40<01:05, 11.80it/s]
6025.14533605    32.5707817818
6316.95598898    30.4936556455
26242.4064932    13.3240829226
 39%|███▊      | 488/1261 [00:40<01:06, 11.59it/s]
22200.6429997    9.33625872055
1486733.13037    8.55210636947
9914.71459653    18.5894081622
 39%|███▉      | 492/1261 [00:40<01:06, 11.53it/s]
4518.08016236    16.8422937784
22189.0657235    22.0496697875
23007.4426206    8.57791997029
 39%|███▉      | 494/1261 [00:40<01:04, 11.82it/s]
6596.41789154    9.55466244809
2584.11718185    6.16808969844
1363.27667    11.9115848003
 39%|███▉      | 498/1261 [00:41<01:04, 11.77it/s]
6547.76158161    6.35219364854
4998.38887962    4.85754821957
1669.76889523    6.31689608564
 40%|███▉      | 500/1261 [00:41<01:04, 11.88it/s]
2305.7969489    3.76532174343
2461.60894859    18.8090378814
869.395137534    31.5243108426
 40%|███▉      | 504/1261 [00:41<01:03, 11.95it/s]
68347.7090281    32.393101221
11703.7776268    35.0029262581
22262.3713543    35.9881250767
 40%|████      | 508/1261 [00:42<01:02, 12.00it/s]
8082.29820121    34.014928825
7382.09445344    41.6141653207
39281.0342891    35.3299063704
 40%|████      | 510/1261 [00:42<01:02, 12.02it/s]
897.582301267    41.5387389229
3907.93643    36.3504805198
7563.90117898    33.0225093564
 41%|████      | 514/1261 [00:42<01:02, 12.04it/s]
8696.70054062    26.347913036
13353.9412747    6.35004980621
36638.016567    12.7446141964
 41%|████      | 516/1261 [00:42<01:01, 12.12it/s]
8175.31353563    8.43584718303
4771.98744778    19.7344923077
9986.74944518    28.4714754763
 41%|████      | 520/1261 [00:43<01:00, 12.24it/s]
2869.99344994    25.9582001641
12055.9519525    36.3955443485
17705.6318057    22.9734053844
 41%|████▏     | 522/1261 [00:43<01:00, 12.18it/s]
14234.6058121    20.674030753
13469.601518    18.606764642
26075.1391714    14.4640360468
 42%|████▏     | 526/1261 [00:43<01:00, 12.19it/s]
10861.4369096    5.68455714925
25320.1624333    6.847677433
5298.80999377    15.2777014762
 42%|████▏     | 528/1261 [00:43<00:59, 12.24it/s]
3448.55870872    22.4345813869
1984.17218695    41.2923554806
4929.1525371    30.5072899397
 42%|████▏     | 532/1261 [00:44<00:59, 12.33it/s]
2408.41502902    6.42945822907
890.168085129    3.68956702809
3563.86006547    29.4616944898
 42%|████▏     | 534/1261 [00:44<00:59, 12.25it/s]
9184.27096782    34.7679499402
6687.1035469    31.6552445085
66689.4956889    14.9117249874
 43%|████▎     | 538/1261 [00:44<00:59, 12.25it/s]
289531.784325    4.09566420408
17156.0183122    7.71473434733
850.996325506    24.4760341345
 43%|████▎     | 540/1261 [00:44<00:58, 12.34it/s]
1009.68134319    15.856790488
1629.81422362    18.2422992647
7045.65267554    10.4519897106
 43%|████▎     | 544/1261 [00:45<00:59, 12.10it/s]
42837.4685081    2.66005107347
2032.33413528    0.245684569596
4981.06834013    1.99168184599
 43%|████▎     | 546/1261 [00:45<00:58, 12.16it/s]
3629.84634768    8.8653886087
1603.7803305    6.81405036081
1103.45565138    18.251228878
 44%|████▍     | 552/1261 [00:45<00:57, 12.40it/s]
490.815181594    54.3029184057
616.548998209    59.1344221633
2945.4914836    67.1738191714
 44%|████▍     | 554/1261 [00:45<00:57, 12.35it/s]
3434.85788518    67.4551823842
1258.75666308    77.1455100184
1132.1927935    101.253599501
 44%|████▍     | 558/1261 [00:46<00:56, 12.35it/s]
1186.61296637    132.349231705
3699.83294468    92.7835048257
1032.38024788    23.8484766554
 44%|████▍     | 560/1261 [00:46<00:56, 12.32it/s]
613.002625236    99.9298000315
18198.6728413    188.680398067
133.621164954    229.631621622
 45%|████▍     | 564/1261 [00:46<00:57, 12.22it/s]
116.184927538    250.720734796
474.903860933    178.661911483
51.6322107638    104.606951679
 45%|████▍     | 566/1261 [00:46<00:56, 12.30it/s]
190.058049528    107.162231158
11565.276022    58.6712786523
 45%|████▌     | 570/1261 [00:47<00:54, 12.69it/s]
1560.91771194    21.5286156858
1109.32701635    2.96874665738
 46%|████▌     | 574/1261 [00:47<00:54, 12.62it/s]
771.984400231    3.22099458454
1010.61622155    7.77614393424
 46%|████▌     | 576/1261 [00:47<00:54, 12.63it/s]
1095.83296789    117.834050565
1235.87831362    132.583135259
560.752168092    37.6469443197
 46%|████▌     | 580/1261 [00:47<00:54, 12.54it/s]
5843.53644693    72.0129915445
4807.91444191    188.643056207
2341.0439673    37.0668805049
 46%|████▋     | 584/1261 [00:48<00:53, 12.55it/s]
3484.66176586    22.7539316125
595.618793716    47.4032406247
405.504326796    96.2767692985
 46%|████▋     | 586/1261 [00:48<00:54, 12.43it/s]
121.379210877    62.9666542763
115.30250197    315.250512603
229.230799069    395.819410763
 47%|████▋     | 590/1261 [00:48<00:54, 12.29it/s]
129.938582065    315.51218403
2930.10027335    356.522161343
1727.98863227    34.2452790248
 47%|████▋     | 592/1261 [00:48<00:54, 12.30it/s]
836.675189292    55.4661833231
 47%|████▋     | 596/1261 [00:49<00:54, 12.10it/s]
1752.0345224    69.1138680937
374.268208955    56.6982874227
405.604616675    84.2770551566
 47%|████▋     | 598/1261 [00:49<00:54, 12.14it/s]
1014.01258166    89.9876527516
9122.7028273    89.6852114382
1386.87224507    86.9693154735
 48%|████▊     | 602/1261 [00:49<00:54, 12.15it/s]
1414.59170155    89.4462132274
1207.83450388    110.97942057
7166.65393095    129.586091917
 48%|████▊     | 604/1261 [00:49<00:53, 12.25it/s]
603.7882473    123.937036987
5143.49403553    125.513329913
50.4960528723    95.2723870949
 48%|████▊     | 606/1261 [00:50<00:55, 11.85it/s]
103.616420307    55.2072479114
 49%|████▊     | 612/1261 [00:50<00:55, 11.69it/s]
45.7330733109    52.6909433089
 50%|████▉     | 626/1261 [00:51<00:53, 11.78it/s]
117.490809384    75.3021719728
162.109514862    84.9139921476
145.309140153    84.0575333059
 50%|████▉     | 630/1261 [00:52<00:52, 11.98it/s]
107.973582545    111.010547454
63.2566504919    81.1704022357
 51%|█████     | 638/1261 [00:52<00:53, 11.72it/s]
67.6971668789    72.5565264437
97.9998221519    117.801530602
187.209803529    111.336786013
 51%|█████     | 640/1261 [00:52<00:52, 11.89it/s]
203.416388604    87.9785873055
 53%|█████▎    | 668/1261 [00:55<00:48, 12.12it/s]
27.2880376108    50.184297631
 56%|█████▌    | 700/1261 [00:57<00:45, 12.32it/s]
56.4426477608    54.5650900501
39.3533697439    58.1902461442
32.8195223729    69.3617333386
 56%|█████▌    | 702/1261 [00:58<00:45, 12.29it/s]
20.0279722257    70.0172955804
17.5195481389    64.6959169731
67.3101044818    64.8973307522
 56%|█████▌    | 706/1261 [00:58<00:46, 11.93it/s]
86.0804092695    67.6604005631
90.1689181606    72.6244199575
97.1637446544    67.5739848322
 56%|█████▌    | 708/1261 [00:58<00:46, 11.92it/s]
127.343241581    62.8653355437
134.575851245    62.1983424124
122.984760806    67.602165715
 56%|█████▋    | 712/1261 [00:58<00:47, 11.50it/s]
129.82526715    67.3097152712
149.295886571    63.7542299261
110.846116332    56.1868011033
 57%|█████▋    | 714/1261 [00:59<00:47, 11.51it/s]
178.307731947    50.7146515112
105.304930678    59.7804536647
159.604185233    64.4349748101
 57%|█████▋    | 718/1261 [00:59<00:46, 11.60it/s]
144.79848851    65.4337485064
131.559099365    54.171235894
 58%|█████▊    | 732/1261 [01:00<00:48, 10.93it/s]
13.8721794256    50.2024248336
20.4260364137    63.9213762775
22.9397935232    62.5759514251
 58%|█████▊    | 736/1261 [01:01<00:49, 10.53it/s]
15.5178240103    58.5780144124
10.1724787571    56.563419358
33.4112034826    54.1998376621
 59%|█████▊    | 740/1261 [01:01<00:48, 10.74it/s]
9.62004807219    60.1934851322
41.7696485089    52.9658907129
94.1093224891    64.6481119395
 59%|█████▉    | 742/1261 [01:01<00:47, 10.89it/s]
93.680803465    65.0107840403
86.7222197095    70.5973602326
72.5390984269    69.8043191987
 59%|█████▉    | 746/1261 [01:02<00:46, 11.11it/s]
51.048092989    72.8909418833
68.9874446175    66.7713555085
70.5613764045    60.193495346
 59%|█████▉    | 748/1261 [01:02<00:44, 11.40it/s]
106.032385873    54.5156815999
 60%|█████▉    | 756/1261 [01:02<00:43, 11.64it/s]
95.1949901774    50.4601782858
 62%|██████▏   | 780/1261 [01:04<00:40, 11.91it/s]
118.470892914    55.1082551454
116.538193457    56.1530066099
170.596363187    52.1232148335
 63%|██████▎   | 796/1261 [01:06<00:38, 12.05it/s]
124.829245579    56.0779421452
304.776481498    62.9869680714
357.418904352    58.3134631873
 63%|██████▎   | 800/1261 [01:06<00:37, 12.15it/s]
377.0674093    56.6534823347
 64%|██████▍   | 806/1261 [01:06<00:37, 12.27it/s]
25.5269202218    64.9872541691
10.8660509634    65.5058504256
22.697414574    60.813401676
 64%|██████▍   | 810/1261 [01:07<00:36, 12.37it/s]
28.8743180417    64.3812133013
4.56386470075    51.2414854536
 65%|██████▍   | 818/1261 [01:08<00:38, 11.57it/s]
151.763463557    56.8012232421
171.994356824    59.0034917136
 68%|██████▊   | 856/1261 [01:11<00:33, 11.92it/s]
443.620575825    52.9118503367
443.898546729    58.2757072045
741.887306043    54.368315732
 68%|██████▊   | 858/1261 [01:11<00:33, 11.97it/s]
807.396903121    54.075890946
675.087200856    46.258701819
 69%|██████▊   | 866/1261 [01:12<00:33, 11.95it/s]
243.386941171    51.3915245498
161.66241423    65.1786647028
219.514455419    57.527315692
 69%|██████▉   | 868/1261 [01:12<00:32, 12.13it/s]
224.704674536    73.6793128419
289.364856326    69.25536674
360.939181749    62.153416817
 69%|██████▉   | 872/1261 [01:12<00:32, 12.07it/s]
334.098402135    67.6700488746
142.704430991    64.2981184174
104.956764155    78.1522506237
 69%|██████▉   | 874/1261 [01:12<00:32, 11.98it/s]
148.787839944    79.7498772665
113.359729315    92.5991121618
483.760425142    87.7840456946
 70%|██████▉   | 878/1261 [01:13<00:31, 11.99it/s]
223.232347523    74.8579575479
266.416091083    83.5077290072
190.516997586    87.2772281487
 70%|██████▉   | 880/1261 [01:13<00:31, 12.15it/s]
113.693536192    80.080950168
98.3971729591    77.840345942
120.175548932    72.8659475807
 70%|███████   | 884/1261 [01:13<00:29, 12.58it/s]
144.578325102    83.3234309853
110.1479624    75.1118109373
241.601886428    62.9714562261
 70%|███████   | 886/1261 [01:13<00:30, 12.44it/s]
43.101512671    55.6654500423
 71%|███████   | 890/1261 [01:13<00:30, 12.22it/s]
608.664165455    21.4487770426
1028.32829289    35.458656077
1352.46047102    40.2743785506
 71%|███████   | 894/1261 [01:14<00:29, 12.30it/s]
1042.28990157    46.0820310397
1220.13720655    43.9694121537
711.327293943    39.1172870424
 71%|███████   | 896/1261 [01:14<00:29, 12.21it/s]
659.397967532    31.0459095868
689.383867387    26.99472135
674.363711576    35.9620954462
 71%|███████▏  | 900/1261 [01:14<00:29, 12.09it/s]
805.586967819    37.7009904088
777.192335285    40.4811041291
1144.79757722    34.3867774459
 72%|███████▏  | 902/1261 [01:14<00:29, 12.10it/s]
538.27848418    24.8552824687
931.465330608    37.8568506353
1362.82773631    41.4507463248
 72%|███████▏  | 906/1261 [01:15<00:30, 11.82it/s]
1012.30394519    51.8516511299
894.773669688    58.2948349884
265.92300424    51.6844414983
 72%|███████▏  | 908/1261 [01:15<00:29, 11.87it/s]
281.296663486    58.2160928317
 73%|███████▎  | 918/1261 [01:16<00:28, 12.01it/s]
140.59629647    52.4757966025
53.6561747858    53.4897192877
 76%|███████▌  | 954/1261 [01:19<00:26, 11.59it/s]
207.745156308    54.5290548433
11.6871761649    53.7628654396
 77%|███████▋  | 972/1261 [01:20<00:23, 12.12it/s]
556.752085431    4.95157795946
1195.99597899    9.66087751215
3546.23033021    1.66231044584
 77%|███████▋  | 976/1261 [01:21<00:23, 12.19it/s]
4738.69501598    12.4420533758
3433.38343441    7.85196985452
1194.64439787    0.0967688355096
 79%|███████▊  | 992/1261 [01:22<00:22, 12.17it/s]
22752.1776318    48.595775168
1298.60419157    287.36260048
564.220551375    46.6722934009
 80%|███████▉  | 1004/1261 [01:23<00:20, 12.36it/s]
130.37181226    95.1415470735
320.693864657    132.351266517
467.57113317    169.739488374
 80%|███████▉  | 1006/1261 [01:23<00:20, 12.36it/s]
241.150456348    152.332933046
441.638270093    63.3969549716
309.285658555    67.9788432251
 80%|████████  | 1012/1261 [01:24<00:20, 12.30it/s]
274.712188927    56.3585870692
1037.30754857    61.3772908421
959048.236332    121.48658884
 80%|████████  | 1014/1261 [01:24<00:20, 12.34it/s]
3552.55960617    123.903497603
3181.72390611    128.82684711
2511.28498935    139.675962408
 81%|████████  | 1018/1261 [01:24<00:19, 12.34it/s]
342.359882038    105.986581354
254.080396695    113.809284214
191.268925356    99.5516869054
 81%|████████  | 1020/1261 [01:24<00:19, 12.36it/s]
137.120423335    98.8670240883
95.631469563    112.133060168
1168.40083745    91.3121192284
 81%|████████  | 1024/1261 [01:25<00:20, 11.80it/s]
1313.15606819    107.738009129
2656.6656788    124.919187077
308.439761621    126.802476712
 81%|████████▏ | 1026/1261 [01:25<00:19, 11.96it/s]
160.847932523    153.088640829
148.375612057    94.7863854662
216.58118504    75.5120745131
 82%|████████▏ | 1032/1261 [01:25<00:18, 12.10it/s]
10.8637550187    55.5736151818
217.856319983    59.9471169411
 82%|████████▏ | 1034/1261 [01:25<00:18, 12.06it/s]
13.9269129213    59.8608407741
52.8737609353    121.386564488
 83%|████████▎ | 1044/1261 [01:26<00:18, 11.62it/s]
190.164367264    455.923479214
 83%|████████▎ | 1046/1261 [01:26<00:18, 11.61it/s]
82.6203946924    69.4407339417
 83%|████████▎ | 1050/1261 [01:27<00:18, 11.66it/s]
3.45910980972    80.1157635561
387.760672044    1350.92180397
389.951232779    1100.34122496
 83%|████████▎ | 1052/1261 [01:27<00:18, 11.51it/s]
98.6346410651    79.3085407072
44.4055028057    76.3672304073
101.591068346    89.1751714704
 84%|████████▍ | 1058/1261 [01:28<00:18, 11.16it/s]
517.588035695    36.9031233562
531.325024673    38.6360906389
559.968019802    62.7742500777
 84%|████████▍ | 1062/1261 [01:28<00:17, 11.52it/s]
268.842386246    84.7465261098
332.435942197    109.316663583
293.715129805    102.217488838
 85%|████████▍ | 1066/1261 [01:28<00:17, 11.10it/s]
543.578951682    20.4619400519
722.195255683    18.9633092353
888.469142223    43.8375840276
 85%|████████▍ | 1068/1261 [01:28<00:17, 11.32it/s]
1057.43458522    35.9685449822
1169.56020409    44.9138535467
1319.84001206    29.8651981455
 85%|████████▌ | 1072/1261 [01:29<00:16, 11.24it/s]
1832.11590306    27.3460574336
1891.80121414    45.6781928184
649.435062419    33.6131463646
 85%|████████▌ | 1074/1261 [01:29<00:16, 11.42it/s]
534.641733645    43.709736003
 86%|████████▌ | 1082/1261 [01:30<00:15, 11.65it/s]
603.960736948    54.146791327
563.094505988    45.7207725217
601.568710855    44.928115598
 86%|████████▋ | 1088/1261 [01:30<00:14, 11.89it/s]
288.225346498    65.0767249943
 87%|████████▋ | 1094/1261 [01:31<00:14, 11.87it/s]
655.385885851    37.8277903684
728.688520836    47.6156548886
899.318077511    25.1308254203
 87%|████████▋ | 1098/1261 [01:31<00:14, 11.28it/s]
956.856399585    22.6564645746
792.295158023    17.5488480299
931.022336784    11.5409565612
 87%|████████▋ | 1100/1261 [01:31<00:13, 11.50it/s]
780.693309294    17.4450790715
625.078029084    13.0596007445
549.87069197    9.59109358592
 88%|████████▊ | 1104/1261 [01:32<00:13, 11.41it/s]
505.093117352    39.2876502378
1015.43526358    49.3651622283
 88%|████████▊ | 1108/1261 [01:32<00:13, 11.44it/s]
524.808014817    21.5958057882
528.949113779    27.3486248574
 88%|████████▊ | 1110/1261 [01:32<00:13, 11.58it/s]
521.397423773    40.5696544116
675.725789692    15.0812162292
 88%|████████▊ | 1114/1261 [01:32<00:12, 11.67it/s]
769.252776606    26.9744470939
906.991107415    15.1294197633
1059.85509891    21.301814754
 89%|████████▊ | 1116/1261 [01:33<00:12, 11.84it/s]
1146.33844077    34.44320935
1269.69942657    10.9778747991
921.633022253    5.62179704251
 89%|████████▉ | 1120/1261 [01:33<00:11, 11.92it/s]
703.477102838    6.57508566517
719.96529856    15.2551676863
688.422212992    32.535896868
 89%|████████▉ | 1124/1261 [01:33<00:11, 11.95it/s]
354.429867853    60.1153053179
216.187562685    81.1253957052
179.693175577    63.456797167
 89%|████████▉ | 1126/1261 [01:33<00:11, 11.93it/s]
271.488939029    81.3881832202
220.089566576    77.581317962
290.789177024    66.247911476
 90%|████████▉ | 1130/1261 [01:34<00:10, 11.97it/s]
342.984563599    77.7619065448
177.884384932    51.6791075966
 90%|█████████ | 1136/1261 [01:34<00:10, 12.13it/s]
541.350981775    31.256630363
610.534503571    25.606136664
591.514302392    10.5317220442
 90%|█████████ | 1140/1261 [01:35<00:09, 12.15it/s]
675.103173985    16.4305044689
662.949609259    12.8733519279
706.995235507    9.35625476759
 91%|█████████ | 1144/1261 [01:35<00:09, 12.16it/s]
531.349409622    21.5449759098
 91%|█████████ | 1146/1261 [01:35<00:09, 11.64it/s]
570.861315436    0.18155303313
808.172557308    16.0498191638
959.080700809    14.9748819403
 91%|█████████ | 1150/1261 [01:35<00:09, 11.86it/s]
649.804023112    10.4227989939
837.134380051    33.4929460329
970.996537628    24.7305531811
 91%|█████████▏| 1152/1261 [01:36<00:09, 11.76it/s]
773.29466204    29.5388115844
529.189256239    26.8287282882
 92%|█████████▏| 1156/1261 [01:36<00:08, 12.02it/s]
483.622960407    50.2420836785
 92%|█████████▏| 1158/1261 [01:36<00:08, 12.04it/s]
274.908842839    68.4660484161
203.277117857    56.7136504868
248.9165245    59.6781959936
 93%|█████████▎| 1172/1261 [01:37<00:07, 12.36it/s]
550.45107181    30.3724304831
678.665603207    16.51137556
852.074991746    15.6853091772
 93%|█████████▎| 1174/1261 [01:37<00:07, 12.25it/s]
703.841133133    25.1150424785
 94%|█████████▎| 1180/1261 [01:38<00:06, 12.07it/s]
504.756150367    31.9809557233
777.704414023    26.646736748
1098.2658589    26.9772555695
 94%|█████████▎| 1182/1261 [01:38<00:06, 12.01it/s]
771.019967319    37.5764554741
960.287188036    32.5605018497
1200.83572742    39.9142600837
 94%|█████████▍| 1186/1261 [01:38<00:06, 11.69it/s]
1251.23185593    38.4210934095
767.794651599    21.5247317164
 95%|█████████▌| 1200/1261 [01:40<00:05, 12.00it/s]
402.600844799    53.8985759975
404.573927423    78.1656915212
510.280549386    62.0255023774
 95%|█████████▌| 1204/1261 [01:40<00:04, 12.07it/s]
376.887052257    68.3901736226
275.485802094    54.4965985098
 97%|█████████▋| 1220/1261 [01:41<00:03, 12.04it/s]
542.798927521    31.0987575219
607.086770381    21.7941643126
560.579649478    33.9132378188
 97%|█████████▋| 1228/1261 [01:42<00:02, 12.10it/s]
501.340595046    17.2643937789
932.876585153    38.388990733
687.153883148    41.5017722291
 98%|█████████▊| 1230/1261 [01:42<00:02, 12.06it/s]
936.46358217    57.9338311375
1134.70314736    56.3101041272
817.385788493    47.8555517729
 98%|█████████▊| 1234/1261 [01:42<00:02, 11.99it/s]
797.389646175    49.3239428659
 98%|█████████▊| 1238/1261 [01:43<00:01, 11.58it/s]
560.95289729    37.4768728545
1034.3149447    52.284648467
6802.60918256    53.2391954772
 98%|█████████▊| 1240/1261 [01:43<00:01, 11.82it/s]
2478.24245894    37.8915536802
4613.3512679    41.0251633528
3029.44776034    30.5195063669
 99%|█████████▊| 1244/1261 [01:43<00:01, 12.07it/s]
1520.46469826    24.8643543821
1985.31047002    42.0968327598
1221.87559916    27.9794104219
 99%|█████████▉| 1246/1261 [01:43<00:01, 12.29it/s]
713.377614448    35.3270565296
650.436198956    35.2184082851
 99%|█████████▉| 1250/1261 [01:44<00:00, 12.11it/s]
741.457149514    14.1683640563
966.834192638    5.85984110651
1354.51086065    4.02547285055
 99%|█████████▉| 1252/1261 [01:44<00:00, 12.10it/s]
4862.97145705    16.5969752877
2898.71383324    16.0406639881
100%|█████████▉| 1256/1261 [01:44<00:00, 12.23it/s]
16917.9747145    26.1220800954
6646.24117947    13.0630681173
9480.25620534    15.7684419659
100%|█████████▉| 1258/1261 [01:44<00:00, 11.70it/s]
2492.04469902    11.6606600355
5885.59900936    1.86804678314
9873.49240154    13.6104525151
100%|█████████▉| 1260/1261 [01:45<00:00, 11.80it/s]
3073.04452677    14.348956729
[MoviePy] Done.
[MoviePy] >>>> Video ready: test_videos_output/project_video_output.mp4 

CPU times: user 5min 6s, sys: 2.26 s, total: 5min 9s
Wall time: 1min 45s

Play the video inline.

In [10]:
white_output = 'test_videos_output/project_video_output.mp4'
HTML("""
<video width="960" height="540" controls>
  <source src="{0}">
</video>
""".format(white_output))
Out[10]: